Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rclone import #103

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

roleohibachi
Copy link

In support of #102, this implements:

  • class wizardPage_rsync - an attempt at a functional QWizardPage. Never done this before, almost certainly needs attention. The rest of the GUI has not been modified to create a path to it (I don't know how).
  • function import_rclone - handling of rclone-derived data, comments below.
  • function parse_rclone_remote - tool for reading a remote configuration from an rclone config file. Fairly minimal since, unlike OD, the format is "correct" INI.

If an rclone onedrive remote is provided, a new config is created (largely reusing code from the "create config" page). The drive_id is taken from rclone. The refresh_token is also taken, since it belongs to the same user, and written to the refresh_token file. Information on the this rclone feature is here.

If an rclone alias remote is provided, it is split into the "real remote" (which should be a onedrive, and is used to populate the import function) and the path that was aliased. The path is then listed in the sync_list file, which will include only that path in sync. Information on this rclone feature is here. I feel there should be more error handling here, but I'm not sure what failure cases would look like.

Decision for maintainers: whether to use the rclone "remote_name" as the new profile's name, or whether to use the user-provided value.

Here is a sample rclone.conf (with realistic, but bogus, values). rclone.conf.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant